package com.example.app19_broadcastreceiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

/**
 * 自定义广播接收器
 */
public class MyBroadcastReceiver2 extends BroadcastReceiver {

    private static final String TAG = "MyBroadcastReceiver2";

    public MyBroadcastReceiver2() {
        Log.i(TAG, "MyBroadcastReceiver2()");
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getStringExtra("action");
        Log.i(TAG, "MyBroadcastReceiver2 onReceive: " + action);
    }

}
